package com.earl.eatbao.domain.eatbao;

import java.io.Serializable;

import javax.persistence.Entity;

import com.earl.eatbao.commons.domain.AbstractAuditingEntity;

/**
 * 收货地址
 * @author Administrator
 * @version 1.0
 * @updated 22-十一月-2016 20:16:35
 */
@Entity
public class Address extends AbstractAuditingEntity<Long> implements Serializable{

	//用户ID
	private Long userId;
	//用户收货联系手机
	private String phone;
	//用户收货者姓名
	private String name;

	/**
	 * 地址名字
	 */
	private String addressName;
	
	/**
	 * 是否是用户默认地址
	 */
	private boolean isDefault;
	
	/**
	 * 纬度
	 */
	private double latitude;
	
	/**
	 * longitude
	 */
	private double longitude;
	
	public double getLatitude() {
		return latitude;
	}
	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}
	public double getLongitude() {
		return longitude;
	}
	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}
	public String getAddressName() {
		return addressName;
	}
	public void setAddressName(String addressName) {
		this.addressName = addressName;
	}
	public boolean isDefault() {
		return isDefault;
	}
	public void setDefault(boolean isDefault) {
		this.isDefault = isDefault;
	}

    /**
     * Getter for property 'userId'.
     *
     * @return Value for property 'userId'.
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * Setter for property 'userId'.
     *
     * @param userId Value to set for property 'userId'.
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * Getter for property 'phone'.
     *
     * @return Value for property 'phone'.
     */
    public String getPhone() {
        return phone;
    }

    /**
     * Setter for property 'phone'.
     *
     * @param phone Value to set for property 'phone'.
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * Getter for property 'name'.
     *
     * @return Value for property 'name'.
     */
    public String getName() {
        return name;
    }

    /**
     * Setter for property 'name'.
     *
     * @param name Value to set for property 'name'.
     */
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Address[" +
                "id=" + super.getId() +
                ", userId=" + userId +
                ", phone='" + phone + '\'' +
                ", name='" + name + '\'' +
                ", addressName='" + addressName + '\'' +
                ", isDefault=" + isDefault +
                ", latitude=" + latitude +
                ", longitude=" + longitude +
                ']';
    }
}